import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { CommonEntity } from '@/common/entities/base.entity';

@Entity({
  name: "sys_file_downloads",
  comment: "文件下载信息表"
})
export class Download extends CommonEntity {
  @PrimaryGeneratedColumn({
    type: "int",
    comment: "主键"
  })
  id: number;

  @Column({
    unique: true,
    comment: "文件唯一标识符",
    name: "file_id"
  })
  fileId: string;

  @Column({
    comment: "下载文件的用户ID",
    name: "user_id"
  })
  userId: number;

  @CreateDateColumn({
    comment: "下载时间",
    name: "downloaded_at"
  })
  downloadedAt: Date;
}
